import storage from 'good-storage'

export function setInfo(userInfo) {
    storage.set('userInfo', userInfo)
}

export function getInfo() {
    return storage.get('userInfo')
}

export function removeInfo() {
    storage.remove('userInfo')
}

export function setLoginInfo(loginInfo) {
    storage.set('loginInfo', loginInfo)
}

export function getLoginInfo() {
    return storage.get('loginInfo')
}

export function removeLoginInfo() {
    storage.remove('loginInfo')
}

export function setWeight(weight) {
    storage.set('weight', weight)
}

export function getWeight() {
    return storage.get('weight')
}

export function removeWeight() {
    storage.remove('weight')
}

export function setScanTime(time) {
    storage.set('scanTime', time)
}

export function getScanTime() {
    return storage.get('scanTime')
}

export function removeScanTime() {
    storage.remove('scanTime')
}

export function setErrorWeight(errorWeight) {
    storage.set('errorWeight', errorWeight)
}

export function getErrorWeight() {
    return storage.get('errorWeight')
}

export function removeErrorWeight() {
    storage.remove('errorWeight')
}

export function setTableData(tableData) {
    storage.set('tableData', tableData)
}

export function getTableData() {
    return storage.get('tableData')
}

export function removeTableData() {
    storage.remove('tableData')
}

// export function setAbnormalFlag(abnormalFlag) {
//     storage.set('abnormalFlag', abnormalFlag)
// }
// export function getAbnormalFlag() {
//     storage.get('abnormalFlag')
// }
// export function removeAbnormalFlag() {
//     storage.remove('abnormalFlag')
// }

/* 工位台配置信息 */
export function setConfigData(configData) {
    storage.set("configData", configData);
}
export function getConfigData() {
    return storage.get("configData");
}
export function delConfigData() {
    storage.remove("configData");
}